<?php
	require_once 'db-connection.php';
	
	if(isset($_POST['email'])) {
		global $dbConnection;
		$email = $_POST["email"];
		$query = "select username 
				from users where 
				e_mail = '$email';";
		$statement = $dbConnection->execute($query);
		$count = $statement->num_rows();
		if($count == 1) {
			echo "<span style='color:red'>A user has been registered with this e-mail address!</span>";
		}
	}
?>